package com.market.dao.jpa;

import org.springframework.stereotype.Repository;

import com.market.dao.AccountRecordDao;
import com.market.domain.AccountRecord;



@Repository("accountRecordDao")
public class AccountRecordDaoJpa extends GenericDaoJpa<AccountRecord, Long>
		implements AccountRecordDao {

	public AccountRecordDaoJpa() {
		super(AccountRecord.class);
	}

	public void remove(AccountRecord accountRecord) {
		if (this.findById(accountRecord.getId()) == null) {
			log.debug(this.getClass() + " AccountRecord with id "
					+ accountRecord.getId() + " not found, can not be deleted");
		} else {
			log.debug(this.getClass() + " AccountRecord with id "
					+ accountRecord.getId() + " found, will be deleted");
			super.removeById(accountRecord.getId());
		}
	}
}
